package com.blq.developtools.utils;

import android.os.Build;
import android.view.accessibility.AccessibilityEvent;

import blq.ssnb.snbutil.SnbLog;

/**
 * <pre>
 * ****************************************************************
 * 文件名称:SystemUtils.java
 * 作 者:SSNB
 * 创建时间:2024/5/15
 * 文件描述:
 * 注意事项:
 * 版权声明:Copyright (C) 2015-2025 杭州中焯信息技术股份有限公司
 * 修改历史:2024/5/15 1.00 初始版本
 * ****************************************************************
 * </pre>
 */
public class SystemUtils {
    public static void SystemId() {
        StringBuilder sb = new StringBuilder();
        sb.append("主板： ").append(Build.BOARD).append("\n");
        sb.append("系统启动程序版本号： ").append(Build.BOOTLOADER).append("\n");
        sb.append("系统定制商：").append(Build.BRAND).append("\n");
        String[] abis = Build.SUPPORTED_ABIS;
        for (int i = 0; i < abis.length; i++) {
            sb.append("cpu指令集").append(i).append(": ").append(abis[i]).append("\n");
        }
        sb.append("设置参数： ").append(Build.DEVICE).append("\n");
        sb.append("显示屏参数：").append(Build.DISPLAY).append("\n");
        sb.append("无线电固件版本：").append(Build.getRadioVersion()).append("\n");
        sb.append("硬件识别码：").append(Build.FINGERPRINT).append("\n");
        sb.append("硬件名称：").append(Build.HARDWARE).append("\n");
        sb.append("HOST: ").append(Build.HOST).append("\n");
        sb.append("修订版本列表：").append(Build.ID).append("\n");
        sb.append("硬件制造商：").append(Build.MANUFACTURER).append("\n");
        sb.append("版本：").append(Build.MODEL).append("\n");
        sb.append("硬件序列号：").append(Build.SERIAL).append("\n");
        sb.append("手机制造商：").append(Build.PRODUCT).append("\n");
        sb.append("描述Build的标签：").append(Build.TAGS).append("\n");
        sb.append("TIME: ").append(Build.TIME).append("\n");
        sb.append("builder类型：").append(Build.TYPE).append("\n");
        sb.append("USER: ").append(Build.USER).append("\n");
    }



    public static String getEventTypeString(int eventType) {
        String name = "eventType:null";
        switch (eventType) {
            case AccessibilityEvent.TYPE_VIEW_CLICKED:
                name = "TYPE_VIEW_CLICKED";
                break;
            case AccessibilityEvent.TYPE_VIEW_LONG_CLICKED:
                name = "TYPE_VIEW_LONG_CLICKED";
                break;
            case AccessibilityEvent.TYPE_VIEW_SELECTED:
                name = "TYPE_VIEW_SELECTED";
                break;
            case AccessibilityEvent.TYPE_VIEW_FOCUSED:
                name = "TYPE_VIEW_FOCUSED";
                break;
            case AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED:
                name = "TYPE_VIEW_TEXT_CHANGED";
                break;
            case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
                name = "TYPE_WINDOW_STATE_CHANGED";
                break;
            case AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED:
                name = "TYPE_NOTIFICATION_STATE_CHANGED";
                break;
            case AccessibilityEvent.TYPE_VIEW_HOVER_ENTER:
                name = "TYPE_VIEW_HOVER_ENTER";
                break;
            case AccessibilityEvent.TYPE_VIEW_HOVER_EXIT:
                name = "TYPE_VIEW_HOVER_EXIT";
                break;
            case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_START:
                name = "TYPE_TOUCH_EXPLORATION_GESTURE_START";
                break;
            case AccessibilityEvent.TYPE_TOUCH_EXPLORATION_GESTURE_END:
                name = "TYPE_TOUCH_EXPLORATION_GESTURE_END";
                break;
            case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED:
                name = "TYPE_WINDOW_CONTENT_CHANGED";
                break;
            case AccessibilityEvent.TYPE_VIEW_SCROLLED:
                name = "TYPE_VIEW_SCROLLED";
                break;
            case AccessibilityEvent.TYPE_VIEW_TEXT_SELECTION_CHANGED:
                name = "TYPE_VIEW_TEXT_SELECTION_CHANGED";
                break;
            case AccessibilityEvent.TYPE_ANNOUNCEMENT:
                name = "TYPE_ANNOUNCEMENT";
                break;
            case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED:
                name = "TYPE_VIEW_ACCESSIBILITY_FOCUSED";
                break;
            case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED:
                name = "TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED";
                break;
            case AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY:
                name = "TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY";
                break;
            case AccessibilityEvent.TYPE_GESTURE_DETECTION_START:
                name = "TYPE_GESTURE_DETECTION_START";
                break;
            case AccessibilityEvent.TYPE_GESTURE_DETECTION_END:
                name = "TYPE_GESTURE_DETECTION_END";
                break;
            case AccessibilityEvent.TYPE_TOUCH_INTERACTION_START:
                name = "TYPE_TOUCH_INTERACTION_START";
                break;
            case AccessibilityEvent.TYPE_TOUCH_INTERACTION_END:
                name = "TYPE_TOUCH_INTERACTION_END";
                break;
            case AccessibilityEvent.TYPE_WINDOWS_CHANGED:
                name = "TYPE_WINDOWS_CHANGED";
                break;
            case AccessibilityEvent.TYPE_VIEW_CONTEXT_CLICKED:
                name = "TYPE_VIEW_CONTEXT_CLICKED";
                break;
            case AccessibilityEvent.TYPE_ASSIST_READING_CONTEXT:
                name = "TYPE_ASSIST_READING_CONTEXT";
                break;
            case AccessibilityEvent.TYPE_SPEECH_STATE_CHANGE:
                name = "TYPE_SPEECH_STATE_CHANGE";
                break;
            case AccessibilityEvent.TYPE_VIEW_TARGETED_BY_SCROLL:
                name = "TYPE_VIEW_TARGETED_BY_SCROLL";
                break;
        }

        return name;

    }
}
